From: Florian Müllner Date: Thu, 12 Sep 2019 22:41:47 +0000 (+0200) Subject: cleanup: Switch some method calls to new indentation style X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~811^2^2~74 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3a9eaa39ea50c909a3409d236c74259db4a2f079;p=gnome-shell.git cleanup: Switch some method calls to new indentation style The legacy indent rule currently ignores arrow functions in parameters to allow callbacks to not align with the other arguments: this._someFunctionWithFairlyLongishName(arg1, arg2, arg3, () => { this._someOtherFunctionWithLongName(arg1); }); But as ignoring entire nodes means we can end up with arbitrary indentation, we should drop the exception. While this would make the above "illegal" under the legacy config, it conforms with the non-legacy style, so everything should be fine ... ... except that eslint starts to complain about some function args that should be fine under the legacy config. Maybe it's thrown off by the function-arg-in-arrow-function-in-function-arg structure, but rather than figuring it out, let's just move those to the new style. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725 --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index c9ede2fc1..33233db90 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -116,8 +116,8 @@ var ScreenshotService = class { try { let [result, area, filenameUsed] = screenshot.screenshot_area_finish(res); - this._onScreenshotComplete(result, area, filenameUsed, - flash, invocation); + this._onScreenshotComplete( + result, area, filenameUsed, flash, invocation); } catch (e) { invocation.return_gerror (e); } @@ -134,8 +134,8 @@ var ScreenshotService = class { try { let [result, area, filenameUsed] = screenshot.screenshot_window_finish(res); - this._onScreenshotComplete(result, area, filenameUsed, - flash, invocation); + this._onScreenshotComplete( + result, area, filenameUsed, flash, invocation); } catch (e) { invocation.return_gerror (e); } @@ -152,8 +152,8 @@ var ScreenshotService = class { try { let [result, area, filenameUsed] = screenshot.screenshot_finish(res); - this._onScreenshotComplete(result, area, filenameUsed, - flash, invocation); + this._onScreenshotComplete( + result, area, filenameUsed, flash, invocation); } catch (e) { invocation.return_gerror (e); } diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js index 56d7802b3..0423fd510 100644 --- a/js/ui/status/accessibility.js +++ b/js/ui/status/accessibility.js @@ -179,8 +179,8 @@ class ATIndicator extends PanelMenu.Button { settings.is_writable(KEY_TEXT_SCALING_FACTOR), enabled => { if (enabled) - settings.set_double(KEY_TEXT_SCALING_FACTOR, - DPI_FACTOR_LARGE); + settings.set_double( + KEY_TEXT_SCALING_FACTOR, DPI_FACTOR_LARGE); else settings.reset(KEY_TEXT_SCALING_FACTOR); });